import request from '@/utils/request'

/**
 * 获取流程模型规则
 * @returns {*}
 */
export function getBpmProcessRules(query) {
  return request({
    url: '/proc-rule/get-rules',
    method: 'get',
    params: query
  })
}

export function editBpmProcessRules(data) {
  return request({
    url: '/proc-rule/edit',
    method: 'post',
    data: data
  })
}

export function getFirstNodeRule(key) {
  return request({
    url: '/proc-rule/getFirstNodeRule?key=' + key,
    method: 'get'
  })
}

export function getBpmRule(data) {
  return request({
    url: '/proc-rule/get-bpm-rule',
    method: 'post',
    data: data
  })
}

/**
 * 获取流程模型规则By预设置
 * @returns {*}
 */
export function getBpmProcessRules4SetUp(query) {
  return request({
    url: '/proc-rule/getRulesSetUp',
    method: 'get',
    params: query
  })
}
